<!DOCTYPE html>
<html>

<head>
    <#include "/zf/admin/components/meta.html" />
    <title>蓁奕科技 ${metaTitleSuffix!}</title>
    <#include "/zf/admin/components/stylesheets.html" />
</head>

<body>
    <div id='app'>
        <el-container>
            <#assign menuIndex="2-1" />
            <#include "/zf/admin/components/menu.html" />
            <el-container>
                <#include "/zf/admin/components/header.html" />
                <el-main>
                    <template>
                       <!--   <el-date-picker v-model="dateRange" type="datetimerange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd HH:mm:ss" unlink-panels="true" :default-value="new Date">
                            </el-date-picker>
                         <el-input v-model="keyword" clearable placeholder="输入用户名搜索" style="width: 217px;"></el-input>
                            <el-button   @click="onSearch"><i class="el-icon-search"></i>搜索</el-button> -->
                        <el-button @click='onAdd'>新增</el-button>
                        <el-table :data="items" style="width: 100%">
                            <!-- <el-table-column prop="id" label="id">
                            </el-table-column> -->
                            <el-table-column prop="username" label="登录名">
                            </el-table-column>
                           
                            <el-table-column prop="password" label="密码">
                            </el-table-column>
                         <el-table-column  label="操作">
                                <template slot-scope="scope">
                                   <el-button   @click="onDelte(scope.row)">删除</el-button>
                                </template>
                            </el-table-column>
                        </el-table>
                        <#include '/components/page.html' />
                    </template>
                </el-main>
            </el-container>
        </el-container>
        <#include "/zf/admin/components/footer.html" />
    </div>
    <#include "/zf/admin/components/scripts.html" />
    <script type="text/javascript">
    var vue = new Vue({
        el: '#app',
        data() {
            return {
                time:'',
                items: toJson(`${items![]}`),
                keyword:'${keyword!}',
                 dateRange: ''


            }
        },
          

        mounted: function() {
              var startTime = '${startTime!""}'
            if (startTime != '') {
                this.dateRange = new Array;
                this.dateRange.push('${startTime!}');
                this.dateRange.push('${endTime!}');
            }
        },
        methods: {
            onAdd(){
                location.href = '/zf/admin/auth/info'
            },
              onDelte(info) {
                this.$confirm('确定删除?', '提示', {
                    confirmButtonText: '确定',
                    cancelButtonText: '取消',
                    type: 'warning'
                }).then(() => {
                    var param = {
                        id: info.id
                    }
                    axiosRequest(param, '/zf/admin/auth/delete', '')
                }).catch(() => {});
            },
            // download(info){
            //        window.location.href = "/zf/admin/comment/list?openId=" + info.openId+"&dl=1"
            // }
        }
           
    })
    </script>
</body>

</html>